<script language=javascript src=../Դ����/eph0.js></script>
<script language=javascript src=../Դ����/ephB.js></script>
���ǹ�����(���㵽J2000.0ƽλ��)
����/����<input type=checkBox id=Ca checked>
<input type=button onclick="javascript:fx()" value="ȷ��">
������<input type=checkBox id=Cb checked>
ȫ����<input type=checkBox id=Cc checked>
<input type=button onclick="javascript:te()" value="����">
<br>
<textarea cols=100 rows=15 id=B1>
��1
J2008.5,* 0 48 49.767, +5 19 27.03, 0.0507, -1.141, 0.134, 5.74 ,��1019 ,G.Psc 96 K2
J2008.5,* 0 26 42.175,-42 15 35.34, 0.0210, -0.354, 0.042, 2.40 ,��12   ,Phe ��   K0
J2008.5,= 2 36 25.185, -7 47 41.99,-0.0022, -0.060, 0.006, 5.53 ,��1074 ,Cet 80   M0
J2008.5,= 2 36 19.295,  5 37 47.81,-0.0019, -0.024, 0.009, 4.87 ,��1072 ,Cet ��   G8

</textarea><br>

<textarea cols=100 rows=15 id=B2></textarea><br>
<textarea cols=100 rows=15 id=B3></textarea>

<script language=javascript>


    function kg(s) { //ȥ��һЩ�ո�
        var c = '';
        if (s.substr(4, 1) == '��') c = s.substr(0, 1)
        s = c + s.substr(2, s.length - 2);
        s = s.replace(/m|(��)|\'/g, ' ');
        s = s.replace(/h|s|\"/g, '');
        return s;
    }


    function fx() { //�������
        var s = B1.innerText;
        var i, t, c, r = '';
        var f = new Array(), b = new Array();

        var sn = s.indexOf('\r\n');
        var km = s.substr(0, sn); //�����
        s = s.substr(sn + 2, s.length - sn - 2);//ȥ���1��
        s = s.replace(/(\r\n)+/g, ',');       //�ѻ��з�������
        //s = s.replace(/, +/g,',');          //ȥ��ź�Ŀո�
        s = s.split(',');
        for (i = 0, k = 0; i < s.length; i += 9) {
            if (!s[i] || s[i].length < 5) continue;
            //��ȡ��Ԫ
            t = (s[i].substr(1, 4) - 2000) * 365.25;  //������������
            c = s[i].substr(5, 2);
            if (c == '.0') ;
            if (c == '.5') t += 365.25 / 2;
            t /= 36525;

            c = s[i + 1];
            c = c.replace(/(^\s*)|(\s*$)/g, ''); //ȥ��ǰ��ո�
            b[0] = str2rad(c.substr(1, c.length), 1);
            b[1] = str2rad(s[i + 2], 0);
            b[2] = 1;


            b = CDllr_D2J(t, b, 'P03'); //����ת���ٸ����У�ȷ��2008����ȷ(��ʵ�����Ⱥ�ԵͶ�γ��Ӱ��ǳ�С)���������������к���ת
            b[0] -= s[i + 3] * t * 100 / rad * 15;
            b[1] -= s[i + 4] * t * 100 / rad;


            r += c.substr(0, 1);
            r += kg(rad2strE(b[0], 1, 3)) + ',';
            r += kg(rad2strE(b[1], 0, 2)) + ',';
            r += s[i + 3] + ',' + s[i + 4] + ',' + s[i + 5] + ',';
            r += s[i + 6] + ',' + s[i + 7] + ',' + s[i + 8] + '#';
        }
        r = km + '#' + r;
        if (Ca.checked) r = r.replace(/\#/g, '\r\n');
        else r = "'" + r + "'";
        B2.innerText = r;
    }
    function te() {
        var u = B2.innerText;
        if (u.substr(0, 1) == "'") {
            alert('������ʽ���ǿⲻ��ֱ�Ӳ���');
            return;
        }
        var i, s = '', u = getHXK(u, Cc.checked);
        var Q = Cb.checked ? 35 : 0;
        var jd = 2925.5 - 10;
        for (i = 0; i < 10; i++, jd += 10)
            s += hxCalc(jd / 36525, u, Q, 0, 0, 0);
        B3.innerText = s;

    }


</script>